package tool;

import com.google.common.collect.Maps;
import com.google.common.collect.Sets;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;

public interface TableProperty {
    String TABLE_NAME = "user201600301185";
    String COLFAM = "i";
    String SID = "SID";
    String CID = "CID";
    String TID = "TID";
    String FCID = "FCID";
    String NAME = "NAME";
    String DNAME = "DNAME";
    String TNAME = "TNAME";
    String TYPE = "TYPE";
    String ID = "ID";

    String CLASS = "CLASS";
    String AGE = "AGE";
    String SEX = "SEX";
    String BIRTHDAY = "BIRTHDAY";

    String CREDIT = "CREDIT";
    String SCORE = "SCORE";

    String S = "s";
    String T = "t";
    String C = "c";
    String SC = "sc";
    String TC = "tc";

    String[] S_LABEL = {SID,ID,NAME,SEX,AGE,BIRTHDAY,DNAME,CLASS,TYPE};
    String[] C_LABEL = {CID,ID,NAME,FCID,CREDIT,TYPE};
    String[] T_LABEL = {TID,ID,NAME,SEX,AGE,DNAME,TYPE};
    String[] SC_LABEL = {SID,ID,CID,SCORE,TID,TYPE};
    String[] TC_LABEL = {CID,ID,TID,TYPE};
    Set<String> RE_DUN_LABEL = Sets.newHashSet(TYPE,ID);
    Set<String> I_TABLE = Sets.newHashSet(S,C,T);


//    String[] CHOOSE_LABEL = {CID,ID,NAME,CREDIT,TID,};



    Set<String> IDS = Sets.newHashSet(SID,CID,TID);
    Set<String> ID_KEY = Sets.newHashSet(S,T,C);
    Map<String,String[]> TYPE_MAP = new HashMap<String, String[]>(){
        {
            put(S,S_LABEL);
            put(C,C_LABEL);
            put(T,T_LABEL);
            put(SC,SC_LABEL);
            put(TC,TC_LABEL);
        }
    };
}
